﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZFSDomain.ViewModel.Step
{
    public class MessagesBoxViewModel : ViewModelBase
    {
        public MessagesBoxViewModel()
        {
            _MsgInfoModelList = new ObservableCollection<MsgInfo>();

            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
            _MsgInfoModelList.Add(new MsgInfo() { Icon = "123", Title = "123", TopMsg = "123" });
        }

        private ObservableCollection<MsgInfo> _MsgInfoModelList;

        public ObservableCollection<MsgInfo> MsgInfoModelList
        {
            get { return _MsgInfoModelList; }
        }

    }

    /// <summary>
    /// 消息结构
    /// </summary>
    public class MsgInfo : ViewModelBase
    {
        public string _Icon;
        public string _Title;
        public string _TopMsg;

        /// <summary>
        /// 图标
        /// </summary>
        public string Icon
        {
            get { return _Icon; }
            set { _Icon = value; RaisePropertyChanged(); }
        }

        /// <summary>
        /// 聊天标题
        /// </summary>
        public string Title
        {
            get { return _Title; }
            set { _Title = value; RaisePropertyChanged(); }
        }

        /// <summary>
        /// 最新的聊天消息
        /// </summary>
        public string TopMsg
        {
            get { return _TopMsg; }
            set { _TopMsg = value; RaisePropertyChanged(); }
        }
    }
}
